﻿<extend name="../Public/base" />
<block name="title">{$TITLE}列表</block>
<block name="body">
    <form action="{:U('updateSort')}" method="post">
    <div class="cl pd-5 bg-1 bk-gray">
        <span class="l">
            <a href="javascript:;" onclick="dels()" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a>
            <a href="javascript:;" onclick="layer_show('添加{$TITLE}','{:U("add")}','800','600')" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i> 添加</a>
        </span>
        <span class="r"><button class="btn btn-default radius" type="submit"><i class="Hui-iconfont">&#xe68f;</i> 更新排序</button></span>
    </div>
    <div class="mt-20">
        <table class="table table-border table-bordered table-bg">
            <thead>
                <tr class="text-c">
                    <th width="5%"><input type="checkbox" name="" value=""></th>
                    <th width="5%">ID</th>
                    <th width="20%">链接名称</th>
                    <th width="20%">链接地址</th>
                    <th width="10%">站长Email</th>
                    <th width="10%">站长QQ</th>
                    <th width="10%">排序</th>
                    <th width="10">状态</th>
                    <th width="10%">操作</th>
                </tr>
            </thead>
            <tbody>
            <volist name="list" id="info">
                <tr class="text-c">
                    <td><input type="checkbox" name="id[]" value="{$info.id}"></td>
                    <td>{$info.id}</td>
                    <td>{$info.webname}</td>
                    <td><a href="{$info.url}" target="_blank">{$info.url}</a></td>
                    <td>{$info.email}</td>
                    <td>{$info.qq}</td>
                    <td><input class="input-text text-c" name="sorts[{$info.id}]" value="{$info.sort}" type="text" /></td></td>
                    <td>
                        <eq name='info.status' value='1'>
                            <span class="label label-success radius">已启用</span>
                            <else/>
                            <span class="label radius">已停用</span>
                        </eq>
                    </td>
                    <td class="f-14">
                        <a title="编辑" href="javascript:;" onclick="layer_show('编辑{$TITLE}','{:U('edit',array('id'=>$info['id']))}','800','600')">
                            <i class="Hui-iconfont">&#xe6df;</i>
                        </a>
                        <a title="删除" href="javascript:;" onclick="del('{$info.id}')" class="ml-5" >
                            <i class="Hui-iconfont">&#xe6e2;</i>
                        </a>
                    </td>
                </tr>
            </volist>
            </tbody>
        </table>
    </div>
    <div class='paging_simple_numbers'>{$page}</div>
    </form>
</block>